package com.nobuyme.box.toy;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import com.nobuyme.box.R;
import com.nobuyme.box.util.FragmentUtils;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

import butterknife.OnClick;

public class ToyRentActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//设置成全屏模式
        hideToolbar();

    }

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, ToyRentActivity.class);
        activity.startActivity(intent);

    }

    @Override
    public View createDataView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.activity_toy_rent, null);
        FragmentUtils.replaceFragment(getSupportFragmentManager(),R.id.fl_rent_list,new ToyRentFragment());
        return inflate;
    }

    @OnClick({ R.id.btn_rent_back})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_rent_back:
                finish();
                break;
        }
    }
}
